char* defangIPaddr(char* address) {
	int len = strlen(address);
	char* ptr = NULL;
	char* ans = ptr = malloc(len + 6 + 1);
	while (*address) {
		if (*address == '.') {
			*ptr++ = '[';
			*ptr++ = '.';
			*ptr++ = ']';
		}
		else {
			*ptr++ = *address;
		}
		address++;
	}
	*ptr = '\0';
	return ans;
}